package com.muyu.product.service.impl;

import java.util.List;

import com.muyu.common.core.utils.ObjUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import com.muyu.product.mapper.AsBrandProjectMapper;
import com.muyu.product.domain.AsBrandProject;
import com.muyu.product.service.AsBrandProjectService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;

/**
 * 品牌商品中间Service业务层处理
 *
 * @author DongZeLiang
 * @date 2024-02-27
 */
@Slf4j
@Service
public class AsBrandProjectServiceImpl extends ServiceImpl<AsBrandProjectMapper, AsBrandProject>  implements AsBrandProjectService {

    /**
     * 查询品牌商品中间列表
     *
     * @param asBrandProject 品牌商品中间
     * @return 品牌商品中间
     */
    @Override
    public List<AsBrandProject> list(AsBrandProject asBrandProject) {
        LambdaQueryWrapper<AsBrandProject> queryWrapper = new LambdaQueryWrapper<>();


        if (ObjUtils.notNull(asBrandProject.getBrandId())){
            queryWrapper.eq(AsBrandProject::getBrandId, asBrandProject.getBrandId());
        }

        if (ObjUtils.notNull(asBrandProject.getProjectId())){
            queryWrapper.eq(AsBrandProject::getProjectId, asBrandProject.getProjectId());
        }





        return list(queryWrapper);
    }
}
